home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmSwitch
- BackColor = &H00C0C0C0&
- Caption = "The Switch Program"
- ClientHeight = 4230
- ClientLeft = 1065
- ClientTop = 1515
- ClientWidth = 6720
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 4635
- Icon = "SWITCH.frx":0000
- Left = 1005
- LinkTopic = "Form1"
- ScaleHeight = 4230
- ScaleWidth = 6720
- Top = 1170
- Width = 6840
- Begin VB.CheckBox chkHorizontal
- Caption = "&Horizontal"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 2640
- TabIndex = 11
- Top = 3720
- Width = 1215
- End
- Begin VB.CheckBox chkVisible
- Caption = "&Visible"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3600
- TabIndex = 9
- Top = 1800
- Value = 1 'Checked
- Width = 1215
- End
- Begin VB.CheckBox chkEnable
- Caption = "&Enable"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 2040
- TabIndex = 8
- Top = 1800
- Value = 1 'Checked
- Width = 1215
- End
- Begin VB.Label lblOnOff
- Caption = "ON"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 600
- TabIndex = 12
- Top = 240
- Width = 375
- End
- Begin TegoswLibCtl.Tegosw sw8
- Height = 630
- Left = 2880
- TabIndex = 10
- Top = 3000
- Width = 525
- _version = 65536
- _extentx = 926
- _extenty = 1111
- _stockprops = 64
- End
- Begin TegoswLibCtl.Tegosw sw7
- Height = 630
- Left = 4560
- TabIndex = 7
- Top = 1080
- Width = 525
- _version = 65536
- _extentx = 926
- _extenty = 1111
- _stockprops = 64
- End
- Begin TegoswLibCtl.Tegosw sw6
- Height = 630
- Left = 4080
- TabIndex = 6
- Top = 1080
- Width = 525
- _version = 65536
- _extentx = 926
- _extenty = 1111
- _stockprops = 64
- End
- Begin TegoswLibCtl.Tegosw sw5
- Height = 630
- Left = 3600
- TabIndex = 5
- Top = 1080
- Width = 525
- _version = 65536
- _extentx = 926
- _extenty = 1111
- _stockprops = 64
- End
- Begin TegoswLibCtl.Tegosw sw4
- Height = 630
- Left = 3120
- TabIndex = 4
- Top = 1080
- Width = 525
- _version = 65536
- _extentx = 926
- _extenty = 1111
- _stockprops = 64
- End
- Begin TegoswLibCtl.Tegosw sw3
- Height = 630
- Left = 2640
- TabIndex = 3
- Top = 1080
- Width = 525
- _version = 65536
- _extentx = 926
- _extenty = 1111
- _stockprops = 64
- End
- Begin TegoswLibCtl.Tegosw sw2
- Height = 630
- Left = 2160
- TabIndex = 2
- Top = 1080
- Width = 525
- _version = 65536
- _extentx = 926
- _extenty = 1111
- _stockprops = 64
- End
- Begin TegoswLibCtl.Tegosw sw1
- Height = 630
- Left = 1680
- TabIndex = 1
- Top = 1080
- Width = 525
- _version = 65536
- _extentx = 926
- _extenty = 1111
- _stockprops = 64
- End
- Begin TegoswLibCtl.Tegosw swExit
- Height = 630
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 525
- _version = 65536
- _extentx = 926
- _extenty = 1111
- _stockprops = 64
- value = -1 'True
- End
- Attribute VB_Name = "frmSwitch"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- ' All variables must be declared.
- Option Explicit
- Private Sub chkEnable_Click()
- If chkEnable.Value = 1 Then
- sw1.Enabled = True
- sw2.Enabled = True
- sw3.Enabled = True
- sw4.Enabled = True
- sw5.Enabled = True
- sw6.Enabled = True
- sw7.Enabled = True
- Else
- sw1.Enabled = False
- sw2.Enabled = False
- sw3.Enabled = False
- sw4.Enabled = False
- sw5.Enabled = False
- sw6.Enabled = False
- sw7.Enabled = False
- End If
- End Sub
- Private Sub chkHorizontal_Click()
- If chkHorizontal.Value = 1 Then
- sw8.Horizontal = True
- Else
- sw8.Horizontal = False
- End If
- End Sub
- Private Sub chkVisible_Click()
- If chkVisible.Value = 1 Then
- sw1.Visible = True
- sw2.Visible = True
- sw3.Visible = True
- sw4.Visible = True
- sw5.Visible = True
- sw6.Visible = True
- sw7.Visible = True
- Else
- sw1.Visible = False
- sw2.Visible = False
- sw3.Visible = False
- sw4.Visible = False
- sw5.Visible = False
- sw6.Visible = False
- sw7.Visible = False
- End If
- End Sub
- Private Sub swExit_Click()
- Dim Question
- Dim Response
- ' If the user turned the swExit switch OFF,
- ' confirm that the user wants to exit the
- ' program, and if so, exit the program.
- If swExit.Value = False Then
- lblOnOff.Caption = "OFF"
- Question = "Are you sure you want to exit?"
- Response = MsgBox(Question, vbYesNo + vbQuestion, "Exit Program")
- If Response = vbYes Then
- Unload frmSwitch
- Else
- swExit.Value = True
- lblOnOff.Caption = "ON"
- End If
- End If
- End Sub
-